<!DOCTYPE html>
<html>
<head>
    <title>发票表</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <i-col span="4">
                <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
            </i-col>
            <i-button @click="query">查询</i-button>
            <div class="buttons-group">
                #if($shiro.hasPermission("invoice:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("invoice:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("invoice:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="invoice" :rules="ruleValidate" :label-width="80">
            <Form-item label="" prop="userId">
                <i-input v-model="invoice.userId" placeholder=""/>
            </Form-item>
            <Form-item label="发票类型：1-电子发票；2-纸质发票" prop="invoiceType">
                <i-input v-model="invoice.invoiceType" placeholder="发票类型：1-电子发票；2-纸质发票"/>
            </Form-item>
            <Form-item label="抬头类型：1-个人；2-单位" prop="headerType">
                <i-input v-model="invoice.headerType" placeholder="抬头类型：1-个人；2-单位"/>
            </Form-item>
            <Form-item label="发票抬头" prop="headerContent">
                <i-input v-model="invoice.headerContent" placeholder="发票抬头"/>
            </Form-item>
            <Form-item label="是否默认：0-否;1-是" prop="isDefault">
                <i-input v-model="invoice.isDefault" placeholder="是否默认：0-否;1-是"/>
            </Form-item>
            <Form-item label="发票内容：1-商品明细；2-商品类别" prop="contentType">
                <i-input v-model="invoice.contentType" placeholder="发票内容：1-商品明细；2-商品类别"/>
            </Form-item>
            <Form-item label="收票人手机号码" prop="invoicerMobile">
                <i-input v-model="invoice.invoicerMobile" placeholder="收票人手机号码"/>
            </Form-item>
            <Form-item label="收票人邮箱" prop="invoicerEmail">
                <i-input v-model="invoice.invoicerEmail" placeholder="收票人邮箱"/>
            </Form-item>
            <Form-item label="创建时间" prop="addTime">
                <i-input v-model="invoice.addTime" placeholder="创建时间"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/shop/invoice.js?_${date.systemTime}"></script>
</body>
</html>